package soft.edu.dao;

import org.apache.ibatis.annotations.Param;
import soft.edu.pojo.SchUniAndMaj;
import soft.edu.pojo.SchUniversity;

import java.util.List;

public interface SchUniversityMapper {
    int deleteByPrimaryKey(Integer uniId);

    int insert(SchUniversity record);

    int insertSelective(SchUniversity record);

    SchUniversity selectByPrimaryKey(Integer uniId);

    int updateByPrimaryKeySelective(SchUniversity record);

    int updateByPrimaryKey(SchUniversity record);

    //获取所有院校信息
    public List<SchUniversity> getAll();

    //根据搜索框查找信息
    public List<SchUniversity> getAllbySearch(@Param("keywords") String keywords);

    //根据条件筛选信息
    public List<SchUniversity> getAllbyFiltrate(@Param("city") String city,
                                    @Param("is_211") String is_211,
                                    @Param("is_985") String is_985,
                                    @Param("is_graduate_school") String is_graduate_school,
                                    @Param("is_self_line") String is_self_line);

    //返回根据专业检索后的院校信息【根据yanxin改动】
    public List<SchUniAndMaj> getInfoByUniAndMaj(
            @Param("maj_name") String maj_name);
}